import { request } from "@umijs/max";

export function getFuncList() {
  return request<Array<API.FuncInfo>>('/function/all')
}

export function addFunc(body:API.Func_Add_Body){
  return request<number>('/function/add',{
    method:'POST',
    data:body
  })
}


export function updateFunc(body:API.Func_Update_Body){
    return request<null>('/function/update',{
        method:'POST',
        data:body
    })
}
export async function removeFunc(id:number){
    return request<null>(`/function/remove/${id}`,{
        method:'POST',
        params:id
    })
}
